package com.ruoyi.spot.openapi.orderbook.service.impl;

import java.util.List;

import com.ruoyi.spot.openapi.orderbook.domain.VO.SpotOpenapiOrderbookVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.openapi.orderbook.mapper.SpotOpenapiOrderbookMapper;
import com.ruoyi.spot.openapi.orderbook.domain.SpotOpenapiOrderbook;
import com.ruoyi.spot.openapi.orderbook.service.ISpotOpenapiOrderbookService;

/**
 * 订单簿Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-08
 */
@Service
public class SpotOpenapiOrderbookServiceImpl implements ISpotOpenapiOrderbookService 
{
    @Autowired
    private SpotOpenapiOrderbookMapper spotOpenapiOrderbookMapper;

    /**
     * 查询订单簿
     * 
     * @param id 订单簿主键
     * @return 订单簿
     */
    @Override
    public SpotOpenapiOrderbookVO selectSpotOpenapiOrderbookById(Integer id)
    {
        return spotOpenapiOrderbookMapper.selectSpotOpenapiOrderbookById(id);
    }

    /**
     * 查询订单簿列表
     * 
     * @param spotOpenapiOrderbook 订单簿
     * @return 订单簿
     */
    @Override
    public List<SpotOpenapiOrderbookVO> selectSpotOpenapiOrderbookList(SpotOpenapiOrderbookVO spotOpenapiOrderbook)
    {
        return spotOpenapiOrderbookMapper.selectSpotOpenapiOrderbookList(spotOpenapiOrderbook);
    }

    /**
     * 新增订单簿
     * 
     * @param spotOpenapiOrderbook 订单簿
     * @return 结果
     */
    @Override
    public int insertSpotOpenapiOrderbook(SpotOpenapiOrderbook spotOpenapiOrderbook)
    {
        return spotOpenapiOrderbookMapper.insertSpotOpenapiOrderbook(spotOpenapiOrderbook);
    }

    /**
     * 修改订单簿
     * 
     * @param spotOpenapiOrderbook 订单簿
     * @return 结果
     */
    @Override
    public int updateSpotOpenapiOrderbook(SpotOpenapiOrderbook spotOpenapiOrderbook)
    {
        return spotOpenapiOrderbookMapper.updateSpotOpenapiOrderbook(spotOpenapiOrderbook);
    }

    /**
     * 批量删除订单簿
     * 
     * @param ids 需要删除的订单簿主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiOrderbookByIds(Integer[] ids)
    {
        return spotOpenapiOrderbookMapper.deleteSpotOpenapiOrderbookByIds(ids);
    }

    /**
     * 删除订单簿信息
     * 
     * @param id 订单簿主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiOrderbookById(Integer id)
    {
        return spotOpenapiOrderbookMapper.deleteSpotOpenapiOrderbookById(id);
    }

    @Override
    public List<SpotOpenapiOrderbookVO> selectSpotAllData() {
        return spotOpenapiOrderbookMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotOpenapiOrderbookMapper.queryCurryNumber(currencyPair);
    }
}
